
pkgname=gnupg
pkgver=2.2.8
pkgrel=1
pkgdesc="GNU Privacy Guard 2 - a PGP replacement tool"
arch=('x86_64')
license=('GPL')
url="https://www.gnupg.org/"
depends=('libldap' 'curl' 'bzip2' 'zlib' 'libksba' 'libgcrypt' 'libgpg-error'
        'npth' 'libassuan' 'texinfo' 'readline' 'pinentry' 'gnutls') # 'libusb')
# https://www.gnupg.org/faq/whats-new-in-2.1.html
conflicts=('gnupg2' 'dirmngr')
provides=("gnupg2=${pkgver}" 'dirmngr')
replaces=('gnupg2' 'dirmngr')
source=("https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${pkgver}.tar.bz2")
sha1sums=('d87553a125832ea90e8aeb3ceeecf24f88de56fb')

build() {
	cd gnupg-$pkgver
	
	./configure --prefix=/usr \
              --sysconfdir=/etc \
	      --libexecdir=/usr/lib/gnupg \
	      --enable-maintainer-mode \
	      --enable-symcryptrun \
	      --enable-gpgtar 
  make
}

check() {
	cd gnupg-${pkgver}
	
	make check
}

package() {
	cd ${pkgname}-${pkgver}
	make DESTDIR=${pkgdir} install
	
	ln -s gpg2.1.gz ${pkgdir}/usr/share/man/man1/gpg.1.gz
	#rm ${pkgdir}/usr/share/gnupg/com-certs.pem 
}

